package com.lc202310;

/**
 * Description:
 *
 * @Create 2023/10/8 22:58
 * @Version 1.0
 */
public class Solution263 {
    public boolean isUgly(int n) {
        if (n <= 0) {
            return false;
        }
        int[] arr = {2, 3, 5};
        for (int i : arr) {
            while (n % i == 0) {
                n = n / i;
            }
        }
        return n == 1;
    }
}
